<?php
if (!empty($_POST['cp_save'])) {
	$this->options["adblock1"] = stripslashes($_POST['cp_adblock1']);
	$this->options["adblock2"] = stripslashes($_POST['cp_adblock2']);
	$this->options["adblock3"] = stripslashes($_POST['cp_adblock3']);
	update_option($cpanel['name'], $this->options);
	echo '<div class="updated fade msg" id="message"><p>Your changes have been saved.</p></div>';
}
?>

<div class="cpage">
<h2>Ad Management</h2>

<form action="" method="post">

<fieldset><legend>Header Advertisement Code</legend>
<textarea class="resizable" name="cp_adblock1" id="cp_adblock1"><?php echo stripslashes($this->options["adblock1"]); ?></textarea>
</fieldset>

<fieldset><legend>Sidebar Advertisement Code</legend>
<textarea class="resizable" name="cp_adblock2" id="cp_adblock2"><?php echo stripslashes($this->options["adblock2"]); ?></textarea>
</fieldset>

<fieldset><legend>Footer Advertisement Code</legend>
<textarea class="resizable" name="cp_adblock3" id="cp_adblock3"><?php echo stripslashes($this->options["adblock3"]); ?></textarea>
</fieldset>

<input type="submit" value="Update Settings" name="cp_save" class="button-primary" />
</form>

</div>